home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-05-01 | 933 b | 52 lines | [TEXT/SPM ] |
- /* mac06©1998 by HNS/DSITRI hns@computer.org
- ** netinet/ip.h
- ** 01.05.1998 HNS pulled out from ping.c
- */
-
- #pragma once
-
- #include "netinet/in_systm.h"
-
- /* socket level for setsockopt() */
-
- #define IPPROTO_IP 3
-
- /* socket options for IP level */
-
- #define IP_MULTICAST_TTL 0
- #define IP_MULTICAST_IF 1
- #define IP_MULTICAST_LOOP 2
- #define IP_OPTIONS 3
-
- /* array offset for IP_OPTIONS */
-
- #define IPOPT_OPTVAL 0
- #define IPOPT_OLEN 1
- #define IPOPT_OFFSET 2
-
- /* IP_OPTIONS */
-
- #define IPOPT_RR 0 /* record route */
- #define IPOPT_MINOFF 0 /* minimum offset */
-
- struct ip
- {
- u_char ip_type; /* packe type */
- u_char ip_v; /* version */
- u_char ip_hl; /* header length */
- u_short ip_tos;
- u_short ip_len;
- u_short ip_id;
- u_short ip_off;
- u_char ip_ttl; /* time to live */
- u_char ip_p; /* protocol 6=TCP, 17=UDP */
- u_short ip_sum; /* checksum */
- struct in_addr ip_src;
- struct in_addr ip_dst;
- };
-
- /* EOF */
-
-
-
-